const path = require('path')

// 转发接口
const proxyIp1 = 'http://192.168.2.105:4001';
const proxyIp2 = 'http://192.168.3.105:4002';
module.exports = {
	mode: 'production',
    entry: path.resolve(__dirname, './src/main.js'),
    devServer: {
    	hot: true,
		contentBase: path.join(__dirname, 'dist'),
		compress: true,
		port: 8080,
		proxy: {// 配置多个代理(配置一个 proxy: 'http://localhost:4000' )
			'/api1': {
				target: proxyIp1
			},
			'/api2': {
				target: proxyIp2
			}
		}
	},
};